<%@page import="com.tubeilike.entity.Tube"%>
<%@page import="java.util.List"%>

<%
	request.setCharacterEncoding("UTF-8");	
	String type = "category";
	String totalResult = request.getAttribute("totalResult").toString();	
	String cateString = request.getAttribute("cateString").toString();
	String cateAlias = request.getAttribute("cate").toString();
	String currentPage = request.getAttribute("currentPage").toString();	
	String url = request.getAttribute("url").toString();	
	String title = request.getAttribute("title").toString();
	String description = request.getAttribute("description").toString();	
	String keyword = cateString + ", " +  request.getAttribute("keyword").toString();
%>
<jsp:include page="/element/header.jsp">	
	<jsp:param name="url" value="<%= url %>"/>
	<jsp:param name="title" value="<%=title %>"/>	
	<jsp:param name="keywords" value="<%=keyword %>"/>
	<jsp:param name="description" value="<%=description %>"/>
</jsp:include>
<div class="clear"></div>    
<section id="wrapper">		
	<div class="column-full">
	<br />
        <div class="pager-description">
            <p class="title"><%=cateString%></p>
            <span class="accent-line goright"></span>                               
        </div>	
		<jsp:include page="/element/advertising_top01.jsp"/>				
		<div class="page_wrap">
		<div class="page_container box_alignleft sidebox">
		<div class="viboxes">
			<ul>
<%
	List<Tube> result = (List<Tube>)request.getAttribute("result");
	if(result.size()>0){
	int i = 1;
	for(Tube tub: result){
	if((i%3)!=0){
%>
				<li style="margin-right:30px; margin-bottom:18px;">
				<%
			}else{
				%>
				<li style="margin-right:30px; margin-bottom:18px;"  class="last">
				<%
			}
		%>		
		      	<div class="content" style="width:200px;">
					  <div class="preview" style="height:125px;">
					  <div class="picture">
					  <div class="alpha">
					  	<a href="/video/<%=tub.getTubeId() %>/<%=tub.getAlias().getValue() %>.html" title="<%=tub.getTitle().getValue()%>">
					  		<img src="<%=tub.getThumbImageUrl().getValue() %>" alt="<%=tub.getTitle().getValue()%>" width="200" height="125"/>
				  		</a>
			  		  </div>
			  		  <div class="date">
				  		  	<a class="button red small icon clock" href="/video/<%=tub.getTubeId() %>/<%=tub.getAlias().getValue() %>.html" ><%=tub.getTotalTime().getValue() %></a>
				  		  	<a class="button red small icon refresh repeat" href="https://www.youtube.com/watch?v=<%=tub.getTubeId()%>">Repeat &nbsp;</a>
		  		  	  </div></div></div>
					  <div class="title">
					  		<a href="/video/<%=tub.getTubeId() %>/<%=tub.getAlias().getValue() %>.html" title="<%=tub.getTitle().getValue() %>"><%=tub.getSubTitle()%></a>
				  	  </div>
				</div>
				</li>
		<%
		i++;
	}
	}
%>
			</ul>
			
<div class="clear"></div>
<jsp:include page="/element/paginator.jsp">	
	<jsp:param name="currentPage" value="<%= currentPage %>"/>
	<jsp:param name="totalResult" value="<%= totalResult %>"/>
	<jsp:param name="searchKey" value="<%= cateAlias %>"/>
	<jsp:param name="type" value="<%= type %>"/>
</jsp:include>
<br />
<br />
<br />
</div>
</div>
<div class="page_sidebox box_alignfull">

<div class="follow_us">
<div class="follow_social">
    <div class="iconBox">
    <a href="http://twitter.com/Marius_SEO" target="_blank"><div class="twitter" title="Yeah, stalking is allowed!"></div></a>
 <span>
 <div class="follow-text">Follow us</div>
 </span>
 </div>
 <div class="iconBox">
<a href="http://www.facebook.com/videosoft" target="_blank"><div class="facebook" title="Be one of our happy fans"></div></a>
 <span>
<div class="follow-text">Be a Fan</div>
 </span>
 </div>
<div class="iconBox">
 <a href="http://videoinedit.com/rss.php" target="_blank"><div class="feedburner" title="Get fresh videos on your e-mail!"></div></a>
 <span>
<div class="follow-text">Subscribe</div>
 </span>
 </div>
</div>
</div>

<jsp:include page="/element/most_view.jsp"/>	
<jsp:include page="/element/advertising_right01.jsp"/>	
<jsp:include page="/element/categories.jsp"/>	

</div>
<!-- end pv-sidebox --></div>
</div>
<div class="clear"></div>

<jsp:include page="/element/advertising_right02.jsp"/>	
<jsp:include page="/element/footer.jsp"/>	

